#ifndef __FUSE_IMPLS_H__
#define __FUSE_IMPLS_H__

extern "C" {
	#include <fuse.h>
	#include <fuse/fuse_opt.h>
}
#include <syslog.h>
#include <list>

#include "sur_impls.h"

// string config_file = "";
// string log_file = "";

/**
 * Implementations of the various fuse hooks.
 * All of these (should be) thread safe.
 *
 */

int sdfs_options(void *data, const char *arg, int key,  struct fuse_args *outargs);

void* sdfs_init(struct fuse_conn_info *conn);
void sdfs_destroy(void *ptr);
int sdfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info *fi);
// int sdfs_opendir(const char *path, struct fuse_file_info *fi);
// int sdfs_releasedir(const char *path, struct fuse_file_info *fi);
int sdfs_getattr(const char *path, struct stat *st);
int sdfs_rename(const char *from, const char *to);
int sdfs_read(const char *path, char *buf, size_t size, off_t offset, struct fuse_file_info *fi);
int sdfs_unlink(const char *path);
int sdfs_open(const char *path, struct fuse_file_info *fi);
int sdfs_write(const char *path, const char *buf, size_t size, off_t offset, struct fuse_file_info *fi);
int sdfs_release (const char *path, struct fuse_file_info *fi);
int sdfs_create(const char *path, mode_t mode, struct fuse_file_info *fi);
int sdfs_flush(const char *path, struct fuse_file_info *fi);
int sdfs_create(const char *path, mode_t mode, struct fuse_file_info *fi);
int sdfs_flush(const char *path, struct fuse_file_info *fi);

int sdfs_truncate(const char *path, off_t size);
int sdfs_access(const char *path, int mask);
int sdfs_statfs(const char *path, struct statvfs *st);
int sdfs_mkdir(const char *path, mode_t mode);
int sdfs_rmdir(const char *path);
int sdfs_utimens(const char *path, const struct timespec ts[2]);
int sdfs_chmod(const char *path, mode_t mode);


#endif